import { language as pythonLanguage } from 'monaco-editor/esm/vs/basic-languages/python/python.js'
import 'monaco-editor/esm/vs/basic-languages/python/python.contribution.js'
import { Monaco } from '../types'
export default function registerSnippets(monaco: Monaco) {
  monaco.languages.registerCompletionItemProvider('python', {
    provideCompletionItems() {
      const suggestions: any[] = []
      pythonLanguage.keywords.forEach((item: any) => {
        suggestions.push({
          label: item,
          kind: monaco.languages.CompletionItemKind.Keyword,
          insertText: item
        })
      })

      return {
        suggestions: suggestions
      }
    }
  })
}
